<?php
class Default_Bootstrap extends Zend_Application_Module_Bootstrap {

	protected function _initFrontcontroller(){
		$front = Zend_Controller_Front::getInstance();
		$front->addModuleDirectory(APPLICATION_PATH . '/modules');
		$front->setDefaultModule('default');

		$error = new Zend_Controller_Plugin_ErrorHandler(
		array(
      					'module' => 'default',
      				  	'controller' => 'error',
                    	'action' => 'index',
		));

		$front->registerPlugin($error);

		return $front;
	}
	
	protected function _initTranslation() {
		// Get Locale
		$locale = Zend_Registry::get('Zend_Locale');
		// Set up ZF's translations for validation messages.
		$translate_msg = new Zend_Translate(
		array(
                        'adapter' => 'array',
                        'content' => APPLICATION_PATH .
                        '/../resources/languages/' . $locale . '/Zend_Validate.php',
                        'locale' => $locale)
		);
		Zend_Form::setDefaultTranslator($translate_msg);
		// Save it for later
		Zend_Registry::set('Zend_Translate', $translate_msg);
	}
}